/**
 * 场景3
 * @description: 游戏结束
 * @author: HuiSir
 * @update: HuiSir(2019-6-17 18:30:37)
 */	
(function(window) {
	let Scene3 = window.Scene3 = function() {
		//当前场景
		myGame.curScene = 3
	}
	
	Scene3.prototype.update = function() {
		//小鸟掉落动画
	}
	
	//渲染
	Scene3.prototype.render = function() {
		//渲染背景
		myGame.bg.render()
		//渲染大地
		myGame.land.render()
		//渲染小鸟
		myGame.bird.render()
		//渲染管道
		for (var i = 0; i < myGame.pipeArr.length; i++) {
			myGame.pipeArr[i].render()
		}
		//渲染gameOver
		myGame.ctx.drawImage(myGame.text_game_over,(myGame.c.width-myGame.text_game_over.width)/2,myGame.c.height*0.1)
		//渲染分数
		let scoreLength = myGame.score.toString().length
		for (var i = 0; i < scoreLength; i++) {
			myGame.ctx.drawImage(myGame['font_'+myGame.score.toString()[i]],(myGame.c.width-scoreLength*30)/2 + i*30,myGame.c.height*0.2)
		}
	}
})(window)